//
//  SDCustomFieldView.m
//  SKinDiary
//
//  Created by pcyang on 16/7/9.
//  Copyright © 2016年 tencent. All rights reserved.
//

#import "SDCustomFieldView.h"

@implementation SDCustomFieldView
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
      //  self.backgroundColor = [UIColor colorWithRGB:0xfffff];

        _nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 50, 44)];
        _nameLabel.textColor = [UIColor colorWithRGB:0xbcbec8];
        [_nameLabel setFont:[UIFont systemFontOfSize:13.f]];
        
        [self addSubview:_nameLabel];
    }
    return self;
}

-(void)setKeyName:(NSString*)name
{
    _nameLabel.text = name;
    [_nameLabel sizeToFit];
    _nameLabel.top = (self.height - _nameLabel.height)/2;
}

@end
